sound object
This method will start the sound playback and wait for it to finish before returning.
bool play_wait()
Parameters:
None.
Return value:
true on success, false on failure.
Remarks:
This method will pause the entire script until the sound has finished playing, regardless of its length. If you wish to do other things such as check for keystrokes while the sound is playing, call the "play" method instead and use the property called "playing" to determine when the sound has stopped.
Example:
// Load a sound into memory, play it and close it.
void main()
{
sound test;
test.load("c:\\windows\\media\\ding.wav");
test.play_wait();
test.close();
}